package com.huangfuyi.process.dao;

import com.huangfuyi.process.actuator.enums.EPInstanceStatus;
import com.huangfuyi.process.entity.instance.EPInstanceEntity;

public interface EPCoreInstanceDao<T extends EPInstanceEntity> {

    /**
     * 保存流程实例基础信息
     */
    <E extends EPInstanceEntity> int add(E instanceEntity);

    /**
     * 根据流程实例id查询流程实例信息
     */
    T queryById(String instanceId);

    /**
     * 更新流程实例状态信息并追加运行信息
     */
    int updateStatusAndMessage(String instanceId, EPInstanceStatus status, String message, Long updateTime);
}
